#ifndef _VIRTUAL_MEMORY_H_
#define _VIRTUAL_MEMORY_H_

/*
	class : VMPhysicalMemory
	desc : The Virtual Machine simulated
		Physical Memory. This is used
		to simulate the physical memory of a device
		ideally it would be used to create a virtual
		machine for microcontrollers to help give a good
		idea of how the optimized and compiled is running.
		This can nice if you constantly want to improve the 
		optimizations in your code.
*/
class VMPhysicalMemory
{
	private:
		//this table is used to create the memory of the device
		//to the exact requirements of it down to the word size.
		unsigned char** memoryTable;	
		//word size in bits.
		unsigned long int wordSize; 
		//the total number of addresses in the memory table
		unsigned long int addressSize;
	public:	
		//default constructor for VMPhysicalMemory
		VMPhysicalMemory();
		//constructor takes in the memory table, word size, and address
		//size
		VMPhysicalMemory(unsigned char** table, unsigned long int word,
					unsigned long int address);
		//get word size in bits
		unsigned long int getWordSize();
		//get the address size
		unsigned long int getAddressSize();
		//gets a word from memory
		unsigned char* getWord(unsigned long int address);
		//sets a word in memory
		void setWord(unsigned long int address, unsigned char* word);
		//sets a set of words from memory
		void setWords(unsigned long int startAddress, 
				unsigned char** words,
				unsigned long int numberOfWords);
		//gets a set of words from memory
		unsigned char** getWords(unsigned long int startAddress,
			   		   unsigned long int numberOfWords,
						unsigned char** buffer);

};


#endif
